package com.jxgk.application.service;

import com.jxgk.application.mapper.EtcMapper;
import com.jxgk.application.pojo.Etc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EtcService {
    @Autowired
    private EtcMapper etcMapper;

    public List<Etc> findAll() {
       return   etcMapper.selectAll();
    }


    public void add(Etc etc) {
       etcMapper.insert(etc);
    }

    public void del(Integer rid) {
        etcMapper.deleteByPrimaryKey(rid);
    }

    public void update(Etc etc) {
        etcMapper.updateByPrimaryKeySelective(etc);
    }


    public Etc fid(Integer rid) {
       return etcMapper.selectByPrimaryKey(rid);
    }
}
